#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
    int fenzi = 0;
    int fenmu = 0;
    char c = 0;
    scanf("%d%c%d", &fenzi, &c, &fenmu);
    int i = fenzi;
    int j = fenmu;
    int m = i % j;
    while (m)
    {
        i = j;
        j = m;
        m = i % j;
    }
    fenzi /= j;
    fenmu /= j;
    printf("%d/%d", fenzi, fenmu);
    return 0;
}